package com.yss.sofa.framework.services;

import java.util.Map;
import java.util.concurrent.Future;

public abstract class ServiceFactory {

    public static ServiceFactory getInstance() {
//        ServiceFactory factory = null;
//        factory = (ServiceFactory) OSGIServiceHelper.getOSGIService(ServiceFactory.class.getName());
//        if (factory == null) {
//            throw new SOFAServiceException("未获取到webService工厂OSGI服务.");
//        } else {
//            return factory;
//        }
//        
        return null;
    }

    public abstract <T> T getService(Class<? extends Service> var1);

    public abstract <T> T getService(Class<? extends Service> var1, Map<String, String> var2);

    public abstract <T> T getService(Class<T> var1, String var2);;

    public abstract <T> T getRpcService(Class<T> var1);

    public abstract <T> T getRpcService(Class<T> var1, String var2);

    public abstract <T> Future<T> getFuture();
}
